{include file="public/header" /}
<div class="header">
	<a href="{$config['admin_route']}oyk/enroll_list"><span style="background:#999;">班级列表</span></a>
	<span>报名列表</span>
	<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" onclick="add()">
		<i class="layui-icon layui-icon-add-1"></i>添加
	</button>
	<div></div>
</div>
<table class="layui-table">
	<thead>
		<tr>
			<th>ID</th>
			<th>用户ID</th>
			<th>姓名</th>
			<th>学校</th>
			<th>班级</th>
			<th>家长姓名</th>
			<th>家长手机</th>
			<th>状态</th>
			<th>报名时间</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody>
		{volist name="lists" id='vo'}
			<tr>
				<td>{$vo.enroll_id}</td>
				<td>{$vo.uid}</td>
				<td>{$vo.baby_name}</td>
				<td>{$vo.baby_school}</td>
				<td>{$vo.baby_class}</td>
				<td>{$vo.parent_name}</td>
				<td>{$vo.parent_phone}</td>
				<td>{:date('Y-m-d H:i:s',$vo.add_time)}</td>
				<td>
					{if($vo['status'] == 1)}
						已报名
					{elseif($vo['status'] == 2)/}
						<span style="color:red;">取消报名</span>
					{elseif($vo['status'] == 9)/}
						<span style="color:red;">老师取消报名</span>
					{/if}
				</td>
				<td>
					<button type="button" class="layui-btn layui-btn-primary layui-btn-xs" onclick="edit({$vo.enroll_id})">
						<i class="layui-icon layui-icon-edit"></i>编辑
					</button>
				</td>
			</tr>
		{/volist}
	</tbody>
</table>
<script type="text/javascript">
	layui.use(['layer'],function(){
		layer = layui.layer;
		$ = layui.jquery;
	});
	// 添加
	function add(){
		layer.open({
			type: 2,
			title: '添加',
			shade: 0.3,
			area: ['450px','550px'],
			content: "{$config['admin_route']}oyk/enroll_add?id="+'{$id}'
		});
	}
	// 编辑
	function edit(enroll_id){
		layer.open({
			type: 2,
			title: '编辑',
			shade: 0.3,
			area: ['450px','550px'],
			content: "{$config['admin_route']}oyk/enroll_edit?enroll_id="+enroll_id
		});
	}
</script>
{include file="public/tail" /}